/*
 *    Copyright (c) 2018-2025, boss All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the boss developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: boss
 */

package com.hopes.bizz.stop.risk.alarm.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.hopes.bizz.stop.common.constant.enums.ParkStopSysDictEnum;
import com.hopes.boss.admin.api.resolver.DictResolver;
import com.hopes.boss.common.entity.BaseLogicEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * 报警处理记录
 *
 * @author pig
 * @date 2024-02-22 16:23:32
 */
@Data
@TableName("line_alarm_handle_record")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "报警处理记录")
public class LineAlarmHandleRecordEntity extends BaseLogicEntity {

    private static final long serialVersionUID = 1L;


    /**
     * id
     */
    @Schema(description = "id")
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 模块编码
     */
    @Schema(description = "模块编码")
    private String moduleCode;

    /**
     * 模块标识
     */
    @Schema(description = "模块标识")
    private Long moduleId;

    /**
     * 报警类型
     */
    @Schema(description = "报警类型")
    private Integer alarmType;

    /**
     * 报警时间
     */
    @Schema(description = "报警时间")
    private LocalDateTime alarmTime;

    /**
     * 报警内容
     */
    @Schema(description = "报警内容")
    private String alarmContent;

    /**
     * 处理时间
     */
    @Schema(description = "处理时间")
    private LocalDateTime handleTime;

    /**
     * 处理状态
     */
    @Schema(description = "处理状态")
    private Integer handleStatus;

    /**
     * 处理结果
     */
    @Schema(description = "处理结果")
    private Integer handleResult;

    /**
     * 处理人
     */
    @Schema(description = "处理人")
    private String handlePerson;

    /**
     * 描述
     */
    @Schema(description = "描述")
    private String remarks;

    /**
     * 机构ID
     */
    @Schema(description = "机构ID")
    private Long orgId;

    public String getHandleResultStr() {
        return DictResolver.getItemLabelByValue(ParkStopSysDictEnum.hazard_alarm_handle_result, this.handleResult);

    }

}
